﻿@{
    var requierd = string.Empty;
    if(Model.ExtendRuleValues!=null && Model.ExtendRuleValues.Count > 0)
    {
        var listrulevalues= Model.ExtendRuleValues as List<InputStyleRule>;
        var requiredModel= listrulevalues.Where(a => a.Type== ValidateType.Required.ToString()).FirstOrDefault();
        if (requiredModel!=null)
        {
            requierd = requiredModel.Message;
        }
    }
    List<InputStyleItemVuale> itemvuale=null;
    if(Model.ExtendItemValues!=null && Model.ExtendItemValues.Count > 0)
    {
        itemvuale = Model.ExtendItemValues as List<InputStyleItemVuale>;
    }
    <div class="layui-form-item">
                    <label class="layui-form-label @(!string.IsNullOrEmpty(requierd)?"layui-form-required":"")">@Model.DisplayName</label>
                    <div class="layui-input-block">
                    @foreach(var v in itemvuale){
                        <input type="checkbox"  name="@Model.AttributeName" lay-skin="primary" value="@v.Value" title="@v.Label" @(v.Selected=="1"?"checked":"")>
                    }
                    </div>
    </div>
}
